package ch04.home;
class  Exercise4_10 {
	public static void main(String[] args) {
		int num = 12345;
		int sum = 0;

		//<1
		while(num > 0) {
			sum += num%10;
			num /= 10;
		}
		//1>
		System.out.println("sum="+sum); // sum=15
	}
}
